package cn.mulanbay.job.web.bean.request.trigger;

import cn.mulanbay.common.bean.PageSearch;
import cn.mulanbay.persistent.query.Operator;
import cn.mulanbay.persistent.query.Query;
import cn.mulanbay.schedule.enums.TriggerStatus;
import cn.mulanbay.schedule.enums.TriggerType;

import java.util.Date;

public class TaskTriggerSearch extends PageSearch {

    @Query(column = "name", op = Operator.LIKE)
    private String name;

    @Query(column = "firstExecuteTime", op = Operator.GE)
    private Date startDate;

    @Query(column = "firstExecuteTime", op = Operator.LE)
    private Date endDate;

    @Query(column = "userId", op = Operator.EQ)
    public Long userId;

    @Query(column = "triggerType", op = Operator.EQ)
    private TriggerType triggerType;

    @Query(column = "triggerStatus", op = Operator.EQ)
    private TriggerStatus triggerStatus;

    @Query(column = "groupName", op = Operator.EQ)
    private String groupName;

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public TriggerType getTriggerType() {
        return triggerType;
    }

    public void setTriggerType(TriggerType triggerType) {
        this.triggerType = triggerType;
    }

    public TriggerStatus getTriggerStatus() {
        return triggerStatus;
    }

    public void setTriggerStatus(TriggerStatus triggerStatus) {
        this.triggerStatus = triggerStatus;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }
}
